home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / BSP Tree 1.2 / Sources / Core / source / tabstop.cp < prev    next >
Encoding:
Text File  |  1995-03-19  |  2.0 KB  |  40 lines  |  [TEXT/MMCC]

  1. //------------------------------------------------------------------------------
  2. //    File:                    tabstop.cp
  3. //    Date:                    9/19/94
  4. //    Author:                Bretton Wade
  5. //
  6. //    Description:    this file contains the class methods for a tabstop widget.
  7. //                                a tabstop widget is a widget that can be reached by tabbing.
  8. //
  9. //------------------------------------------------------------------------------
  10.  
  11. #include "tabstop.h"
  12. #include "colors.h"
  13.  
  14. //------------------------------------------------------------------------------
  15. //    frame the widget in the hilite color
  16. //------------------------------------------------------------------------------
  17. void        tabstop::Hilite (bool hilite)                                                                                        //    tell the widget to hilite or unhilite itself
  18. {                                                                                                                                                                //    begin
  19.     if (hilite)                                                                                                                                        //    if hilite is true
  20.         RGBForeColor (&HILITE_COLOR);                                                                                                //    use the hilite color
  21.     else                                                                                                                                                    //    otherwise
  22.     {
  23.         RGBBackColor (&BLACK);                                                                                                            //    be sure it draws right in black and white
  24.         RGBForeColor (&GREY);                                                                                                                //    use the background color
  25.     }
  26.     Rect    h = (*region)->rgnBBox;                                                                                                    //    get the bounding box of the widget
  27.     InsetRect (&h, -1, -1);                                                                                                                //    expand it by 1
  28.     FrameRect (&h);                                                                                                                                //    draw the hilite rectangle
  29.     InsetRect (&h, -1, -1);                                                                                                                //    expand it by 1
  30.     FrameRect (&h);                                                                                                                                //    draw the hilite rectangle
  31.     /*
  32.     InsetRect (&h, 2, 2);                                                                                                                    //    expand it by 1
  33.     FrameRect (&h);                                                                                                                                //    draw the hilite rectangle
  34.     */
  35.     RGBForeColor (&BLACK);                                                                                                                //    reset the foreground color
  36.     RGBBackColor (&WHITE);                                                                                                                //    reset the background color
  37. }                                                                                                                                                                //    end
  38.  
  39. //------------------------------------------------------------------------------
  40.